﻿/*
 * VerticalDatum
 * 
 * initial implementation : 20.11.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Runtime.Serialization;
using System.Collections.Generic;


namespace Petra.Gis.ReferenceSystemServices
{
  /// <summary>
  /// Vertical geodetic datum definition for coordinate system
  /// </summary>
  [DataContract(Name="VDATUM")]
  public partial class VerticalDatum : Datum
  {

    //private DistanceUnit _verticalDatumUnit;


    /// <summary>
    /// xaml constr.
    /// </summary>
    public VerticalDatum() { }




    public VerticalDatum(VerticalDatumType type, DistanceUnit verticalDatumUnit, Metadata metadata)
      :base(metadata)
    {
      VerticalUnit = verticalDatumUnit;
      Type = type;
    }



    /// <summary>
    /// get or set vertical datum units
    /// </summary>
    [DataMember(Name="UNIT", Order = 2)]
    public DistanceUnit VerticalUnit
    { get; set; }




    //private VerticalDatumType _verticalDatumType;
    /// <summary>
    /// set or get type of vertical geodetic datum
    /// </summary>
    //[DataMember]
    public VerticalDatumType Type
    { get; set; }





    /// <summary>
    /// json specific serialize property. MS Json serializes enum as number, not as string
    /// </summary>
    [DataMember(Name = "TYPE", Order = 1)]
    public string strType
    {
      get { return Enum.GetName(typeof(VerticalDatumType), this.Type); }
      set { this.Type = (VerticalDatumType)Enum.Parse(typeof(VerticalDatumType), value); }
    }


  }
}
